A compiler is a computer program which converts the source code of a software project in its entirety into machine code before it is run. Only then is the project run by the processor which means it has all the instructions available to it in machine code right from the start. The processor thus has all the necessary parts ready to run the given software, process input and generate output. In many cases, there is a crucial intermediate step which takes place during the compiling process: before being converted into machine code, most compilers will often first convert it into an intermediate code (i.e. “object code”) which is often compatible with various platforms and can also be used by an interpreter. When generating the code, compilers determine the order in which instructions are sent to the processor. If the instructions are not dependent on one another, the processor can even execute the instructions simultaneously.
|